#include <stdio.h>
int main(int argc , const char *argv[])
{
    int a=5,b=4,c;
 //方法1
    printf("交换前：%d %d\n",a,b);
    c=a;
    a=b;
    b=c;
    printf("交换后：%d %d\n",a,b);
 //方法2
    a=a+b;
    b=a-b;
    a=a-b;
    printf("交换后：%d %d\n",a,b);
 //方法三
    a=a^b;
    b=a^b;
    a=a^b;
   printf("交换后：%d %d\n",a,b);
    return 0;
}